package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by IntelliJ IDEA.
 * User: zm
 * Date: 2023/5/29
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @RequestMapping("hi")
    public String sayHi(String name){
        System.out.println("执行了sayHi方法");
        return "Hi," + name;
    }

    @RequestMapping("/hello")
    public String sayHello(){
        System.out.println("执行了sayHello方法");
        return "Hello,world ";
    }
}
